package com.example.crm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 数据分析与挖掘视图控制器
 */
@Controller
@RequestMapping("/analytics")
public class AnalyticsViewController {

    /**
     * 分析仪表盘
     */
    @GetMapping("/dashboard")
    public String dashboardPage(Model model) {
        return "analytics/dashboard";
    }
    
    /**
     * 数据整合与报表
     */
    @GetMapping("/reports")
    public String reportsPage(Model model) {
        return "analytics/reports";
    }

    /**
     * 数据分析与挖掘首页
     */
    @GetMapping("/analysis")
    public String analysisPage(Model model) {
        return "analytics/analysis";
    }
    
    /**
     * 客户分析页面
     */
    @GetMapping("/customer")
    public String customerAnalysisPage(Model model) {
        return "analytics/customer";
    }
    
    /**
     * 销售分析页面
     */
    @GetMapping("/sales")
    public String salesAnalysisPage(Model model) {
        return "analytics/sales";
    }
    
    /**
     * 服务分析页面
     */
    @GetMapping("/service")
    public String serviceAnalysisPage(Model model) {
        return "analytics/service";
    }
    
    /**
     * 关键指标监控
     */
    @GetMapping("/kpi")
    public String kpiPage(Model model) {
        return "analytics/kpi";
    }
    
    /**
     * 预测分析
     */
    @GetMapping("/predictions")
    public String predictionsPage(Model model) {
        return "analytics/predictions";
    }
    
    /**
     * 预测模型管理页面
     */
    @GetMapping("/models")
    public String predictionModelsPage(Model model) {
        return "analytics/models";
    }
    
    /**
     * 数据挖掘工具页面
     */
    @GetMapping("/mining")
    public String dataMiningPage(Model model) {
        return "analytics/mining";
    }
    
    /**
     * 自定义报表
     */
    @GetMapping("/custom-reports")
    public String customReportsPage(Model model) {
        return "analytics/custom-reports";
    }
} 